#pragma once

#include <IwGeomFVec2.h>

class CIw2DImage;

class Sprite {

	public:
		explicit Sprite();
		~Sprite();
		
		void Load( const char* name );
		void Load( const char* name, int width );
		
		void Unload( );
		
		void Update( float dt );
		
		void Draw( const CIwSVec2& pos );
		
		void DrawFrame( const CIwSVec2& pos, int frame );
		
		void DrawCentered( const CIwSVec2& pos );
		void DrawCenteredRotated( const CIwFVec2& pos, const CIwFVec2& orientation );
		
		void DrawStrip( const CIwSVec2& pos, float strip_width );
		void DrawStripCentered( const CIwSVec2& pos, float strip_width );
		
		float GetWidth() const;
		float GetHeight() const;
		
		CIwSVec2 GetFrameSize() const;
		
	private:
		float m_last_rotation;
		
		CIwSVec2 m_frame_size;
		
		CIw2DImage* m_image;
};
